package com.zz.inventory.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 学校端用户对象 school_users
 * 
 * @author zz
 * @date 2025-07-01
 */
public class Users extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 学校用户ID */
    private Long schoolUserId;

    /** 所属学校ID */
    @Excel(name = "所属学校ID")
    private Long schoolId;

    /** 用户名 */
    @Excel(name = "user_name")
    private String username;

    /** 密码哈希 */
    @Excel(name = "密码哈希")
    private String passwordHash;

    private String remark;

    /** 角色ID(用于关联sys_user_role表) */
    private Long roleId;

    /** 姓名 */
    @Excel(name = "nick_name")
    private String fullName;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 电话 */
    @Excel(name = "phonenumber")
    private String phone;

    /** 最后登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastLogin;

    private Date createTime;

    private String schoolName;  // 新增学校名称字段

    private String status;

    private Long deptId;

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public void setSchoolUserId(Long schoolUserId)
    {
        this.schoolUserId = schoolUserId;
    }

    public Long getSchoolUserId() 
    {
        return schoolUserId;
    }

    public void setSchoolId(Long schoolId) 
    {
        this.schoolId = schoolId;
    }

    public Long getSchoolId() 
    {
        return schoolId;
    }

    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    public void setPasswordHash(String passwordHash) 
    {
        this.passwordHash = passwordHash;
    }

    public String getPasswordHash() 
    {
        return passwordHash;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setFullName(String fullName)
    {
        this.fullName = fullName;
    }

    public String getFullName() 
    {
        return fullName;
    }

    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }

    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }

    public void setLastLogin(Date lastLogin) 
    {
        this.lastLogin = lastLogin;
    }

    public Date getLastLogin() 
    {
        return lastLogin;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("schoolUserId", getSchoolUserId())
            .append("schoolId", getSchoolId())
            .append("username", getUsername())
            .append("passwordHash", getPasswordHash())
            .append("remark", getRemark())
            .append("fullName", getFullName())
            .append("email", getEmail())
            .append("phone", getPhone())
            .append("createTime", getCreateTime())
            .append("lastLogin", getLastLogin())
                .append("status",getStatus())
            .toString();
    }
}
